package state;

/**
 * @author wcj
 * @Date 2021/6/30 22:18
 * @Version 1.0
 */
public class AfternoonState extends State {
    @Override
    public void writeProgram(Work work) {
        if (work.getHour() < 17) {
            System.out.println("下午工作，还可以吧！");
        } else {
            work.setCurrent(new TowardState());
            work.writeProgram();
        }
    }
}
